[Example] 530 — Multi-Provider Chat Completions Proxy for Voice Agent (Python)#210
Conversation
…oice Agent (Python)
21dba4e to
ba37b26
Compare
Code ReviewOverall: CHANGES REQUESTED Tests ran ✅All 8 tests pass — proxy routes to OpenAI successfully and Voice Agent accepts custom endpoint settings via real WebSocket connection. Integration genuineness❌ FAIL — NO RAW PROTOCOL CHECK (check 6)
The Other checks pass:
Code qualityIssues found:
What's good:
Documentation
Fixes attemptedI fixed the Required changes:
Please address the items above. The fix agent will pick this up. Review by Lead on 2026-04-08 |
… in 530-voice-agent-multi-provider-proxy-python - Rewrite demo_agent.py to use DeepgramClient.agent.v1.connect() and send_settings() instead of raw websockets - Rewrite integration test to use the SDK's agent client - Add tags=["deepgram-examples"] to Settings messages - Remove unused json import from providers.py - Remove direct websockets dependency (SDK provides it) - Add .gitignore with __pycache__/
Fix appliedRoot cause: Change: Rewrote Tests after fix ✅✓ Fix verified — tests pass. Fix by Lead on 2026-04-08 |
Code ReviewOverall: APPROVED Tests ran ✅All 8 tests pass with real credentials. OpenAI provider returns valid completions. Deepgram Voice Agent WebSocket accepts custom endpoint settings and returns SettingsApplied. Integration genuineness✅ Pass — all 6 checks clear:
Code quality
Documentation
✓ All checks pass. Ready for merge. Review by Lead on 2026-04-09 |
Code ReviewOverall: APPROVED Tests ran ✅All 8 tests passed with real credentials. OpenAI provider returned valid completions. Deepgram Voice Agent accepted custom endpoint settings and returned SettingsApplied. Integration genuineness ✅
Code quality ✅
Documentation ✅
✓ All checks pass. Ready for merge. Review by Lead on 2026-04-09 |
Code ReviewOverall: APPROVED Tests ran ✅All 8 tests pass with real credentials. The OpenAI provider returns valid chat completions, and the Deepgram Voice Agent WebSocket accepts custom Integration genuineness✅ Pass
Code quality
Documentation
✓ All checks pass. Ready for merge. Review by Lead on 2026-04-09 |
Code ReviewOverall: APPROVED Tests ran ✅Real API calls confirmed:
Integration genuineness✅ Pass — all 6 checks satisfied:
Code quality
Documentation
✓ All checks pass. Ready for merge. Review by Lead on 2026-04-09 |
Code ReviewOverall: APPROVED Tests ran ✅All 8 tests passed with real credentials. OpenAI provider returned valid chat completions. Deepgram Voice Agent accepted custom endpoint settings (SettingsApplied received). Integration genuineness✅ Pass — all 6 checks clear:
Code quality
Documentation
✓ All checks pass. Ready for merge. Review by Lead on 2026-04-09 |
Code ReviewOverall: APPROVED Tests ran ✅All 8 tests pass with real credentials. OpenAI provider returns valid completions. Deepgram Voice Agent API accepts custom endpoint settings and returns SettingsApplied. Integration genuineness✅ Pass — all 6 checks satisfied:
Code quality
Documentation
✓ All checks pass. Ready for merge. Review by Lead on 2026-04-10 |
Code ReviewOverall: APPROVED Tests ran ✅Integration genuineness✅ Pass — All six checks passed:
Code quality
Documentation
✓ All checks pass. Ready for merge. Review by Lead on 2026-04-10 |
Code ReviewOverall: APPROVED Tests ran ✅All 8 tests pass including real OpenAI API calls through the proxy and a real Deepgram Voice Agent WebSocket connection with custom Integration genuinenessPass — all 6 checks clear:
Code quality
Documentation
✓ All checks pass. Ready for merge. Review by Lead on 2026-04-10 |
Code ReviewOverall: CHANGES REQUESTED Tests ran ✅ (7/8) / ❌ (1/8)Failure: Fix: In "url": "https://api.openai.com/v1/chat/completions",to: "url": "https://api.openai.com/v1",(Fix was committed locally but could not be pushed due to permissions.) Integration genuineness✅ Pass — All 6 checks passed:
Code quality
Documentation
Please apply the one-line fix to Review by Lead on 2026-04-10 |
…ti-provider-proxy-python 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Fix appliedRoot cause: The Change: Changed Tests after fix ✅✓ Fix verified — tests pass. Fix by Lead on 2026-04-10 |
Code ReviewOverall: APPROVED Tests ran ✅All 8 tests pass with real credentials. OpenAI provider returns valid chat completion responses. Voice Agent WebSocket connection to Deepgram succeeds and receives SettingsApplied confirmation. Integration genuinenessPass — all 6 checks clear:
Code quality
Documentation
✓ All checks pass. Ready for merge. Review by Lead on 2026-04-10 |
Code ReviewOverall: APPROVED Tests ran ✅All 8 tests passed with real credentials. OpenAI provider returned valid completions, Voice Agent WebSocket accepted custom endpoint settings (SettingsApplied received). Integration genuineness✅ Pass — all 6 checks satisfied:
Code quality
Documentation
✓ All checks pass. Ready for merge. Review by Lead on 2026-04-11 |
|
@deepgram/devrel — VP escalation: this PR has State: labels=type:example,status:review-passed,language:python,integration:voice-agent-multi-provider-proxy; no checks have run. Last activity: 2026-04-11T01:00:36Z |
Code ReviewOverall: APPROVED Tests ran ✅All 8 tests pass with real credentials. OpenAI provider returns valid completions. Deepgram Voice Agent WebSocket accepts custom Integration genuineness ✅
Code quality ✅
Documentation ✅
✓ All checks pass. Ready for merge. Review by Lead on 2026-04-11 |
Code ReviewOverall: APPROVED Tests ran ✅All 8 tests pass with real credentials. OpenAI provider returns valid chat completions; Voice Agent WebSocket connects and receives SettingsApplied. Integration genuineness✅ Pass — all six checks satisfied:
Code quality
Documentation
✓ All checks pass. Ready for merge. Review by Lead on 2026-04-11 |
Code ReviewOverall: APPROVED Tests ran ✅All 8 tests passed with real credentials. The proxy correctly routes to OpenAI, the Voice Agent SDK connects and receives SettingsApplied from the Deepgram Agent WebSocket, and validation tests cover error paths. Integration genuineness✅ Pass — all 6 checks satisfied:
Code quality
Documentation
✓ All checks pass. Ready for merge. Review by Lead on 2026-04-11 |
New example: Multi-Provider Chat Completions Proxy for Voice Agent
Integration: Deepgram Voice Agent API | Language: Python | Products: agent
What this shows
A FastAPI proxy server that exposes an OpenAI-compatible
/v1/chat/completionsendpoint, routing requests to multiple LLM backends (OpenAI, AWS Bedrock). The Deepgram Voice Agent API uses this proxy viathink.endpoint.url, letting developers swap LLM providers without changing application code.The demo script connects a Deepgram Voice Agent to the proxy, demonstrating how STT (nova-3) and TTS (aura-2) run natively on Deepgram while LLM reasoning routes through a configurable backend.
Required secrets
DEEPGRAM_API_KEY— Deepgram consoleOPENAI_API_KEY— OpenAI dashboardAWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AWS_REGIONTests
✅ Tests passed (8/8)
Built by Engineer on 2026-04-08